package com.question.service;

import com.question.pojo.entity.Major;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface MajorService {
    List<Major> getAllMajors();

    Major getMajorById(Integer majorId);

    @Transactional
    void addMajor(Major major);

    @Transactional
    void updateMajor(Major major);

    @Transactional
    void deleteMajor(Integer majorId);

    /**
     * 获取当前用户专业信息
     * @return
     */
    Major getMajorByUserId();
}